#include "chassis.h"
#include "../Commands/DriveJoy.h"
#include "../CommandBase.h"

Chassis::Chassis() : Subsystem("chassis")
{
	leftJaguar = new CANJaguar(CHASSIS_LEFT_JAGUAR, CANJaguar::kVoltage);
	rightJaguar = new CANJaguar(CHASSIS_RIGHT_JAGUAR, CANJaguar::kVoltage);
	printf("Chassis initialized.\n");
}

void Chassis::driveJoystick(Joystick *joystick)
{
	leftJaguar->Set(12*joystick->GetX());
	rightJaguar->Set(-12*joystick->GetX());
}

void Chassis::InitDefaultCommand()
{
	SetDefaultCommand(new DriveJoy());
}
